package cn.edu.nju.software.cdiy.util;

import java.util.Comparator;

import cn.edu.nju.software.cdiy.bean.Hardware;

public class SortByZScoreDesc implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
		Hardware h1 = (Hardware) o1;
		Hardware h2 = (Hardware) o2;
		
		if(h1.getzScore()>h2.getzScore()){
			return -1;
		}else if(h1.getzScore()==h2.getzScore()){
			return 0;
		}else 
			return 1;
	}

}
